package material.command.remote;

import material.command.receiver_命令接收者.Stereo;
import material.command.remote.Command;

public class StereoOnWithCDCommand implements Command {
    Stereo stereo;

    /**
     * 传入音响的实例，然后将其存储在局部变量实例中
     *
     * @param stereo
     */
    public StereoOnWithCDCommand(Stereo stereo) {
        this.stereo = stereo;
    }

    @Override
    public void execute() {
        stereo.on();
        stereo.setCD();
        stereo.setVolume(11);
    }
}
